#!/usr/bin/python3

def factor(n):
	i = 1
	f = 1
	while i <= n:
		f *= i
		i += 1
	return f

while True:
	n = int (input ('N=?'))
	print (n, '!=', factor(n))
